<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>hover</title>

    <style>
        body {
            background: #f5f5f5;
        }
        
        .container {
            margin: 50px;
            background: #f5f5f5;
        }
        
        .card {
            display: flex;
            flex-direction: column;
            align-items: center;
            width: 240px;
            background: #ffffff;
            padding-bottom: 25px;
            transition: all .5s;
        }
        
        .card:hover {
            box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
            transform: translateY(-2px);
        }
        
        .new {
            background-color: #83c44e;
            color: #ffffff;
            font-size: 12px;
            width: 64px;
            height: 20px;
            text-align: center;
            line-height: 20px;
        }
        
        .goods-img {
            width: 160px;
            height: 160px;
        }
        
        .goods-title {
            font-size: 14px;
            color: #333;
            font-weight: 400;
            margin-top: 15px;
        }
        
        .goods-desc {
            color: #b0b0b0;
            font-size: 12px;
            margin-top: 5px;
        }
        
        .price {
            color: #ff6700;
            font-size: 14px;
            margin-top: 10px;
        }
    </style>
</head>

<body>
    <div class="container">
        <div class="card">
            <div class="new">新品</div>
            <img class="goods-img" src="http://i1.mifile.cn/a1/pms_1550642182.7527088!220x220.jpg" alt="">
            <div class="goods-title">小米9 6GB+128GB</div>
            <div class="goods-desc">骁龙855，索尼4800万超广角微距三摄</div>
            <div class="price">2999元</div>
        </div>
    </div>

</body>

</html>